﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Squog_1._1.Managers;

using Microsoft.Xna.Framework;

namespace Squog_1._1
{
    class ScanSprite : DrawableObject
    {
        private int LifeSpan = 10;

        public ScanSprite(SpriteSheet spriteSheet, Vector2 BallPos1, Vector2 BallPos2)
            : base(spriteSheet)
        {
            Vector2 Center = (BallPos1 + BallPos2) / 2;
            float len = (BallPos2 - BallPos1).Length();
            float lenOver2 = len / 2;

            Position = Center - new Vector2(lenOver2);
            Scale = len / 50;
            Depth = 1;
        }

        private void Delete()
        {
            DrawManager.Remove(this);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override void Draw(Vector2 ScreenPosition)
        {
            //LifeSpan--;
            //if (LifeSpan < 0)
            //    Delete();
            base.Draw(ScreenPosition);
        }

    }
}
